<template>
  <el-table :data="log" border style="width: 100%" align="center">
    <el-table-column prop="username" label="登入账户" width="180" align="center"> </el-table-column>
    <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180" align="center"> </el-table-column>
    <el-table-column prop="lastLogin.loginTime" label="上次登入时间" align="center" sortable> </el-table-column>
    <el-table-column prop="nowLogin.ip" label="本次登入ip" align="center"> </el-table-column>
    <el-table-column prop="nowLogin.loginTime" label="本次登入时间" align="center"> </el-table-column>
  </el-table>
</template>
<script>
import * as logApi from "@/api/welcome"
export default {
  data() {
    return {
      log: [],
    };
  },
  meta: {
    title: "glsy",
    icon: "iconfont icon-shouye1",
  },
  async created(){
      let res=await logApi.getLoginLog()
      //console.log(res);
      this.log=res.data.data
  }
};
</script>
<style lang="less" scoped>
    .el-table {
        margin-top: 30px;
    }
</style>